<template>
  <div class="produceDetail-container">
    <div class="search flex_column_center">
      <div class="data-screen-card">
        <el-input v-model="searchValue" style="width: 240px" placeholder="请输入产品编号" :suffix-icon="Search" @keyup.enter="getPageData()"/>
      </div>

      <div>
        <ElButton style="margin-right: 40px" type="primary" @click="getPageData()">确定</ElButton>
        <ElButton type="info" @click="searchValue = ''">清空</ElButton>
      </div>
    </div>
    <div class="content">
      <ElCard>
        <template #header>
          <div class="card-header">
            <span>查询结果</span>
          </div>
        </template>
        <template v-if="processList" v-loading="loading">
          <section v-for="(mode, modei) in processList" :key="modei">
            <div class="content-mode">
              <div class="h2">生产信息：</div>
              <div class="h3">任务单号：{{ mode.processInfo.workOrderCode || '' }}</div>
              <el-timeline v-loading="loading">
                <el-timeline-item placement="top" v-for="(item, i) in mode?.processInfo?.process" :key="i">
                  <template #dot>
                    <span class="dot">{{ i + 1 }}</span>
                  </template>
                  <div class="main flex">
                    <ElRow style="width: 100%">
                      <ElCol :xl="7" :lg="7" :xs="24" class="process">
                        <div class="el-descriptions">
                          <div class="el-descriptions__header">
                            <span>工序信息</span>
                          </div>
                          <ElRow :gutter="8">
                            <ElCol :span="24">
                              <div class="el-descriptions__cell">
                                <span class="el-descriptions__label">工序名称:</span>
                                <span class="el-descriptions__content"> {{ item.processName || '--' }}</span>
                              </div>
                            </ElCol>
                            <ElCol :span="12">
                              <div class="el-descriptions__cell">
                                <span class="el-descriptions__label">产品编号:</span>
                                <span class="el-descriptions__content"> {{ item.code || '--' }}</span>
                              </div>
                            </ElCol>
                            <ElCol :span="12">
                              <div class="el-descriptions__cell">
                                <span class="el-descriptions__label">工序步骤:</span>
                                <span class="el-descriptions__content"> {{ item.orderNum || '--' }}</span>
                              </div>
                            </ElCol>
                            <ElCol :span="12">
                              <div class="el-descriptions__cell">
                                <span class="el-descriptions__label">负责人:</span>
                                <span class="el-descriptions__content" :title="item.nickName || '--'">
                                  {{ item.nickName || '--' }}</span
                                >
                              </div>
                            </ElCol>
                            <ElCol :span="12">
                              <div class="el-descriptions__cell">
                                <span class="el-descriptions__label">产品检验:</span>
                                <span class="el-descriptions__content">
                                  {{ parseInt(item.isOk) == 1 ? '完好' : '异常' }}</span
                                >
                              </div>
                            </ElCol>
                            <ElCol :span="12">
                              <div class="el-descriptions__cell">
                                <span class="el-descriptions__label">开始时间:</span>
                                <span class="el-descriptions__content"> {{ item.startTime || '--' }}</span>
                              </div>
                            </ElCol>
                            <ElCol :span="12">
                              <div class="el-descriptions__cell">
                                <span class="el-descriptions__label">结束时间:</span>
                                <span class="el-descriptions__content"> {{ item.endTime || '--' }}</span>
                              </div>
                            </ElCol>
                          </ElRow>
                        </div>
                      </ElCol>
                      <ElCol :xl="7" :lg="7" :xs="24" class="use">
                        <div class="el-descriptions">
                          <div class="el-descriptions__header">
                            <span>用料信息</span>
                          </div>
                          <ElRow :gutter="8">
                            <ElCol :span="12">
                              <div class="flex_column">
                                <div class="el-descriptions__cell">
                                  <span class="el-descriptions__label auto">磨具:</span>
                                  <span class="el-descriptions__content" v-if="item?.materialRecord.enableMold">
                                    <span class="value">{{
                                      _arrayNewKey(item?.materialRecord?.moldList, 'mouldName', true)
                                    }}</span>
                                    <span class="link" @click="handleView(1)">其他产品</span></span
                                  >
                                </div>
                                <div class="el-descriptions__cell">
                                  <span class="el-descriptions__label auto">设备:</span>
                                  <span class="el-descriptions__content" v-if="item?.materialRecord.enableDevice">
                                    <span class="value">{{
                                      _arrayNewKey(item?.materialRecord?.deviceList, 'deviceName', true)
                                    }}</span>
                                    <span class="link" @click="handleView(item.id)">其他产品</span></span
                                  >
                                </div>
                                <div class="el-descriptions__cell">
                                  <span class="el-descriptions__label auto">人员:</span>
                                  <span class="el-descriptions__content" v-if="item?.materialRecord.enablePersonal">
                                    <span
                                      class="value"
                                      :title="_arrayNewKey(item?.materialRecord?.personalList, 'userName', true)"
                                      >{{ _arrayNewKey(item?.materialRecord?.personalList, 'userName', true) }}</span
                                    >
                                    <span class="link" @click="handleView(item.id)">其他产品</span></span
                                  >
                                </div>
                              </div>
                            </ElCol>
                            <ElCol :span="12">
                              <div>
                                <div class="el-descriptions__cell flex_column">
                                  <span class="el-descriptions__label auto" style="margin-bottom: 6px">材料清单:</span>
                                  <div class="material_list">
                                    <div
                                      class="material_cell flex_sb"
                                      v-for="meta in item?.materialRecord?.materialList"
                                      :key="meta.id">
                                      <div class="flex">
                                        <span>{{ meta.itemName || '' }}</span>
                                        <span>{{ meta.selfCode || '' }}</span>
                                        <span>{{ meta.count || '' }} {{ meta.unitOfMeasure || '' }} </span>
                                      </div>
                                      <span class="link" @click="handleView(meta.id)">查看</span>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </ElCol>
                          </ElRow>
                        </div>
                      </ElCol>
                      <ElCol :xl="10" :lg="10" :xs="24" class="order">
                        <div class="el-descriptions">
                          <div class="el-descriptions__header">
                            <span>报工详情</span>
                          </div>
                          <ElRow :gutter="10" class="order_content">
                            <ElCol
                              :xl="8"
                              :lg="12"
                              v-for="(state, stateI) in item?.statementContentList"
                              :key="state.id">
                              <div class="cell flex_column">
                                <span class="title"
                                  ><span class="drop">●&nbsp;</span>{{ stateI + 1 }}次报工：{{
                                    state.createTime || ''
                                  }}</span
                                >
                                <div class="cell" v-for="(a, aI) in state?.statementList" :key="a.name">
                                  <span class="title">({{ aI + 1 }}) {{ a.name }}</span>
                                  <img :src="b.url" v-for="b in a?.value" :key="a.name" @click="handlePreview(b.url)" />
                                </div>
                              </div>
                            </ElCol>
                          </ElRow>
                        </div>
                      </ElCol>
                    </ElRow>
                  </div>
                </el-timeline-item>
              </el-timeline>
            </div>
            <div class="content-mode w80">
              <div class="h2 flex">
                {{ modei ? '再' : '' }}生产入库信息：
                <div class="flex" v-if="modei">
                  <ElButton type="primary">DT6464654</ElButton>
                  <ElButton type="primary">DT6464655</ElButton>
                </div>
              </div>
              <template v-if="mode.recptInfo">
                <ElRow :gutter="8" style="width: 100%">
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">入库单编号:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.recptCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">入库单名称:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.recptName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 生产工单名称:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.workOrderCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 入库日期:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.recptDate || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 入库人:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.createBy || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 备注:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.remark || '' }}</span>
                    </div>
                  </ElCol>
                </ElRow>
                <ElRow :gutter="8" style="width: 100%">
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">自定义编号:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.selfCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">产品物料名称:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.itemName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">规格型号:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.specification || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 单位:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.unitOfMeasure || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 入库数量:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.quantityRecived || '' }}</span>
                    </div>
                  </ElCol>
                </ElRow>
                <ElRow :gutter="8" style="width: 100%">
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">检验单编号:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.oqcCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">批次号:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.batchCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">仓库名称:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.warehouseName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 库区名称:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.locationName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 库位名称:</span>
                      <span class="el-descriptions__content"> {{ mode?.recptInfo.areaName || '' }}</span>
                    </div>
                  </ElCol>
                </ElRow>
              </template>
            </div>
            <div class="content-mode w80" v-if="modei">
              <div class="h2">销售出库信息：</div>
              <template v-if="mode.salesInfo">
                <ElRow :gutter="8" style="width: 100%">
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">入库单编号:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.salseCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">入库单名称:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.salseName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 生产工单名称:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.workorderCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 入库日期:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.salseDate || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 入库人:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.createBy || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 备注:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.remark || '' }}</span>
                    </div>
                  </ElCol>
                </ElRow>
                <ElRow :gutter="8" style="width: 100%">
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">自定义编号:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.selfCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">产品物料名称:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.itemName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">规格型号:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.specification || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 单位:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.unitOfMeasure || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 入库数量:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.quantityRecived || '' }}</span>
                    </div>
                  </ElCol>
                </ElRow>
                <ElRow :gutter="8" style="width: 100%">
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">检验单编号:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.oqcCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">批次号:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.batchCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">仓库名称:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.warehouseName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 库区名称:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.locationName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 库位名称:</span>
                      <span class="el-descriptions__content"> {{ mode.salesInfo.areaName || '' }}</span>
                    </div>
                  </ElCol>
                </ElRow>
              </template>
              <BiEmpty v-else title="暂无销售出库信息" />
            </div>
            <div class="content-mode w80" v-if="!modei">
              <div class="h2">生产领用信息：日常领料/转产领料/半成品领料</div>
              <template v-if="mode.issuseInfo">
                <ElRow :gutter="8" style="width: 100%">
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label">领料单编号:</span>
                      <span class="el-descriptions__content"> {{ mode.issuseInfo.issueCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 领料单名称:</span>
                      <span class="el-descriptions__content"> {{ mode.issuseInfo.issueName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 生产工单名称:</span>
                      <span class="el-descriptions__content"> {{ mode.issuseInfo.workorderCode || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 领料工序:</span>
                      <span class="el-descriptions__content"> {{ mode.issuseInfo.processName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 领料人:</span>
                      <span class="el-descriptions__content"> {{ mode.issuseInfo.purchase_userName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 领料部门:</span>
                      <span class="el-descriptions__content"> {{ mode.issuseInfo.deptName || '' }}</span>
                    </div>
                  </ElCol>
                  <ElCol :span="4">
                    <div class="el-descriptions__cell">
                      <span class="el-descriptions__label"> 领料日期:</span>
                      <span class="el-descriptions__content"> {{ mode.issuseInfo.issueDate || '' }}</span>
                    </div>
                  </ElCol>
                </ElRow>
              </template>
              <BiEmpty v-else title="暂无生产领用信息" />
            </div>
            <el-divider />
          </section>
        </template>
      </ElCard>
    </div>

    <!-- 查看 -->
    <el-dialog v-model="dialogVisible" title="其他相关产品编号" width="500">
      <el-table :data="tableData" empty-text="暂无数据" style="width: 100%">
        <el-table-column width="50" align="center">
          <template v-slot="scope">
            <el-radio v-model="selectedRadioId" :label="scope.row.id" @change="handleRowChange(scope.row)">{{
              ''
            }}</el-radio>
          </template>
        </el-table-column>

        <el-table-column prop="code" label="产品编号" width="180" />
        <el-table-column prop="time" label="生产时间" width="180" />
      </el-table>

      <template #footer>
        <div class="dialog-footer">
          <el-button @click="dialogVisible = false">取消</el-button>
          <el-button type="primary" @click="handleConfim()"> 确定 </el-button>
        </div>
      </template>
    </el-dialog>
    <!-- 图片预览 -->
    <PreviewImage ref="previewImageRef" />
  </div>
</template>

<script lang="ts" setup>
import { onMounted, reactive, ref } from 'vue';
import { Search } from '@element-plus/icons-vue';
import { ElButton } from 'element-plus';
import { arrayNewKey } from '../../utils/utils';
import { getCodeInfo } from '../../api/taskBi';
import { getProcessNoteInfoByCodeDefault } from '../../api/all';

defineOptions({
  name: 'ProduceDetail',
});

const searchValue = ref('F241208-2-2');
const loading = ref(false);
const detailInfo = ref<any>(null); //详细信息
const previewImageRef = ref<any>(null); //图片预览实例
const processList = ref<any>([]); //查询进度
const dialogVisible = ref(false); //显隐
const tableData = reactive<any>([
  { code: '111111', time: '2024-01-24 12:00:00', id: 1 },
  { code: '2222222', time: '2024-01-24 12:00:00', id: 2 },
]); //表格数据
const selectedRadioId = ref(undefined); // 单选

onMounted(() => {
  getPageData();
});

const getPageData = async () => {
  loading.value = true;

  try {
    let res = await getProcessNoteInfoByCodeDefault({
      code: searchValue.value,
    });

    processList.value = await res.data.map((item: any) => {
      return {
        ...item,
        processInfo: item.processInfo
          ? {
              ...item.processInfo,
              process: item.processInfo.process
                ? item.processInfo.process.map((p: any) => {
                    return {
                      ...p,
                      statementContentList: p.statementContentList
                        ? p.statementContentList.map((state: any) => {
                            return {
                              ...state,
                              statementList: JSON.parse(state?.statementContent),
                            };
                          })
                        : null,
                    };
                  })
                : [],
            }
          : null,
      };
    });

    console.log(processList.value, 'processList');

    detailInfo.value = res.data;
    loading.value = false;
  } catch (error) {}
};

// 查看
const handleView = (type: string | number, data = '') => {
  dialogVisible.value = true;
  return;
  getCodeInfo({
    type,
    data,
  }).then((_res) => {});
};
// 确定
const handleConfim = () => {
  dialogVisible.value = false;
};
// 预览
const handlePreview = (url: string) => {
  previewImageRef.value.open(url);
};
//单选选中数据
const handleRowChange = (row: any) => {
  console.log(selectedRadioId.value, row, 'handleRowChange');
};

// *取数组某key 成新的数组
const _arrayNewKey = (array: any, key: string, distinct = false) => {
  const arr = arrayNewKey(array, key, distinct);
  return arr.join(',');
};

defineExpose({
  getPageData,
});
</script>

<style lang="scss" scoped>
.data-screen-card {
  position: relative;
  width: 40%;
  min-height: 40px;
  height: 40px;
  background: #0f0c29;
  background: linear-gradient(to right, #24243e, #302b63, #0f0c29);
  border: 3px solid #01ffff;
  margin-bottom: 20px;

  &::before {
    position: absolute;
    top: -3px;
    bottom: -3px;
    left: 30px;
    z-index: 0;
    width: calc(100% - 60px);
    pointer-events: none;
    content: '';
    border-top: 3px solid #101f58;
    border-bottom: 3px solid #101f58;
  }

  &::after {
    position: absolute;
    top: 30px;
    right: -3px;
    left: -3px;
    z-index: 0;
    height: calc(100% - 60px);
    pointer-events: none;
    content: '';
    border-right: 3px solid #101f58;
    border-left: 3px solid #101f58;
  }

  :deep() {
    .el-input {
      width: 100% !important;
      height: 41px;
      background: transparent;
    }

    .el-input__wrapper {
      background-color: transparent;
      border: 1px solid transparent !important;
      box-shadow: none !important;
    }

    .el-input__inner {
      color: #fff;
    }
  }
}

.search {
  margin-bottom: 40px;
}

.dot {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #fff;
  border: 1px solid #50a3f8;
  text-align: center;
  line-height: 20px;
  color: #409eff;
}

.content {
  .content-mode {
    border: none;
    box-shadow: 0px 0px 6px rgba(195, 211, 222, 0.501960784313725);
    padding: 12px;
    margin-bottom: 12px;

    &.w80 {
      .el-descriptions__label {
        width: 80px;
      }
    }

    .h2 {
      color: #409eff;
      font-size: 24px;
      margin-bottom: 12px;
    }
    .h3 {
      color: #409eff;
      margin-bottom: 10px;
      padding-left: 12px;
    }
    .el-descriptions__label {
      width: 62px;
    }
  }

  :deep() {
    .el-card {
      background-color: transparent !important;
      border: none !important;
    }

    .el-descriptions__body {
      background-color: transparent !important;
    }

    .el-descriptions {
      border: none;
      box-shadow: 0px 0px 6px rgba(195, 211, 222, 0.501960784313725);
      padding: 12px;
      height: 205px;
      overflow-y: hidden;
    }

    .el-descriptions__title {
      color: #409eff;
    }

    .el-descriptions__label {
      color: #fff;
      display: inline-block;
      width: 60px;
      text-align: left;
    }

    .el-timeline-item__dot {
      left: -6px;
    }
  }

  .card-header {
    color: #fff;
  }

  .el-descriptions__cell {
    padding-bottom: 12px;
    display: flex;

    .material_list {
      width: 100%;

      .material_cell {
        padding: 4px 8px;
        border-bottom: 1px dashed #8f959a;

        .flex {
          span {
            font-size: 12px;
            margin: 2px;
            color: #fff;

            &:last-child {
              margin-right: 0px;
            }
          }
        }
      }
    }
  }

  .el-descriptions__header {
    margin-bottom: 16px;
    color: #409eff;
    font-size: 16px;
    font-weight: bold;
  }

  .el-descriptions__label {
    font-size: 14px;
    font-weight: normal;
    line-height: 23px;

    &.auto {
      width: auto;
    }
  }

  .process {
    .el-descriptions__content {
      color: #fff;
      overflow: hidden;
      max-height: 40px;
      max-width: 160px;
      line-height: 22px;
      text-overflow: ellipsis;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
    }
  }

  .use {
    .el-descriptions__content {
      flex: 1;
      display: flex;
      justify-content: space-between;
      line-height: 22px;

      color: #fff;
      // overflow: hidden;
      // max-height: 40px;

      .value {
        overflow-wrap: break-word; /* 允许在单词内断行 */
        word-break: break-word; /* 防止将单词拆分到下一行 */
        max-width: 130px;
        // min-width: 70px;
        // text-overflow: ellipsis;
        // display: -webkit-box;
        // -webkit-line-clamp: 2;
        // -webkit-box-orient: vertical;
      }
      .link {
        display: inline-block;
        max-width: 56px;
        min-width: 30px;
        height: 23px;
        line-height: 23px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }

  .order {
    .cell {
      .title {
        color: #fff;
        margin-bottom: 8px;
      }
      .drop {
        color: #409eff;
      }
    }

    .el-descriptions {
      display: flex;
      flex-direction: column;
      .order_content {
        flex: 1;
        overflow-y: auto;
      }
    }
  }

  img {
    // transform: rotate(90deg)  translate(calc( 100vh / 2 - 100vw / 2) , calc(100vh / 2 - 100vw / 2));
    display: block;
    max-width: 100%;
    height: 100px;
    cursor: pointer;
    transform: rotate(90de);
  }
}
</style>
